<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>我的合同</title>
		<link href="/static/lvshi_pc/css/person.css" rel="stylesheet" />
		<link href="/static/lvshi_pc/css/swiper-bundle.min.css" rel="stylesheet" />
		<link href="/static/lvshi_pc/css/animate.min.css" rel="stylesheet" />
		<link href="/static/lvshi_pc/css/reset.min.css" rel="stylesheet" />
		<script src="/static/lvshi_pc/js/swiper-bundle.min.js"></script>
		<script src="/static/lvshi_pc/js/jquery.min.js"></script>
		<script src="/static/lvshi_pc/js/wow.min.js"></script>
		<script src="/static/lvshi_pc/js/changeWindow.js"></script>
		<script src="/static/layer/layer.js"></script>
		<script src="/static/global/js/global.js"></script>
		<script src="/static/elementUi/axios.min.js"></script>
		<script src="/static/elementUi/Api.js"></script>
	</head>
	<body>
		<header>
			{include file="public/header"}
		</header>
		<img src="/static/lvshi_pc/images/bannera_02.png" class="banner" alt="">
		<div class="bubox">
			<div class="wrap">
				<div class="dannei">
					<div class="danleft">
						<ul>
							<a href="/index/user/contract.html">
								<li {if empty(input('status'))}class="active"{/if}>
									<div class="dandian"></div>
									<div class="dantitle">全部</div>
								</li>
							</a>
							<a href="/index/user/contract.html?status=-1">
								<li {if input('status') == -1}class="active"{/if}>
									<div class="dandian"></div>
									<div class="dantitle">待审核</div>
								</li>
							</a>
							<a href="/index/user/contract.html?status=1">
								<li {if input('status') == 1}class="active"{/if}>
									<div class="dandian"></div>
									<div class="dantitle">已审核</div>
								</li>
							</a>
						</ul>
						<div class="chuanbox">
							<div class="cbut">
								<img src="/static/lvshi_pc/images/uc_03.png" class="cpic" alt="">
								<div class="ctitle">上传合同</div>
							</div>
						</div>
					</div>
					
					<div class="danyou about">
						<div class="item show">
							<div class="tong">
								<ul>
									{volist name="list" id="vo"}
									<li>
										<div class="dantop">
											<div class="hetitle">{$vo.title}</div>
											{if $vo.status == -1}
											<div class="haolan">{$vo.status_name}</div>
											{else}
											<div class="haohui">已审核</div>
											{/if}
										</div>
										<div class="upbox">
											<div class="upleft">
												{notempty name="$vo.bz"}
													<div class="uptxt">
														平台留言: {$vo.bz}
													</div>
												{/notempty}
												<div class="uptxt">
													上传时间: {$vo.create_time}
												</div>
											</div>
											<a href="{$vo.path}" download="{$vo.title}">
												<img src="/static/lvshi_pc/images/down_03.png"  class="down" alt="">
											</a>
										</div>
									</li>
									{/volist}
								</ul>
							</div>
							<div class="ht-page-b">
								{$list->render()|raw}
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		
		<div class="popmask" >
			<div class="popnei">
				<div class="scbox">
					<form id="myForm">
						<div class="scnei">
							<div class="scli pb40">
								<div class="scleft">
									合同名称
								</div>
								<div class="sckbox">
									<input type="text" name="title" class="scput" placeholder=" ">
									<input type="file" style="display:none;" id="file" onchange="upload()">
								</div>
							</div>
							<div class="scli">
								<div class="scleft">
									合同路径
								</div>
								<div class="sckbox">
									<input type="text" id="path" name="path" class="scput" placeholder=" ">
									<div class="scbut" onclick="showUpload()">上传</div>
								</div>
							</div>
							<div class="sctxt">
								上传的合同仅限word，pdf格式。
							</div>
							<div class="uacbox">
								<div class="ua" onclick="submit()">确认</div>
								<div class="ub">取消</div>
							</div>
						</div>
					
					</form>
				</div>
			</div>
		</div>
		<footer>
			{include file="public/footer"}
		</footer>
		<script>
			function showUpload() {
				$("#file").click()
			}
			function upload() {
				console.log(1111)
				let temp = new FormData();
				temp.append('file',document.getElementById("file").files[0])
				Api.my("/index/user/upload",temp).then(res=>{
					if (res.code == 1) {
						$("#path").val(res.url)
					} else {
						showErrMsg(res.msg)
					}
				})
			}
			function submit() {
				Api.my("/index/user/addDeal",$("#myForm").serialize()).then(res=>{
					if (res.code == 1) {
						showSuccessMsgCall('上传成功')
						location.reload()
					} else {
						showErrMsg(res.msg)
					}
				})
			}
			$('.danleft ul li').click(function() {
				var index = $(this).index();
				var items = $(".about .item");
				$(this).addClass("active").siblings().removeClass("active");
				$(items[index]).addClass("show").siblings().removeClass("show")
			})
			$('.cbut').click(function(){
				$('.popmask').show(500)
			})
			$('.ub').click(function(){
				$('.popmask').hide(500)
			})
			// wow效果启用
			new WOW().init();
		</script>
	</body>

</html>
